<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>构造函数</title>
	</head>
	<body>
		<script>
			function Flower(name,genera,area,uses){
				this.name=name;
				this.genera=genera;
				this.area=area;
				this.uses=uses;
				this.show=show;
			}
			function show(){
					alert(this.name);
				}
			var flower1=new Flower("长春花","夹竹桃科 长春花属","非洲、亚热带、热带、以及中国大陆的华东、西南、中南等地","观赏或用药等");
			var flower2=new Flower("长春花","夹竹桃科 长春花属","非洲、亚热带、热带、以及中国大陆的华东、西南、中南等地","观赏或用药等");
			var flower3=new Flower("长春花","夹竹桃科 长春花属","非洲、亚热带、热带、以及中国大陆的华东、西南、中南等地","观赏或用药等");
			
			flower1.show();
			flower2.show();
			flower3.show();
			
			alert(flower1 instanceof Object);
			alert(flower1 instanceof Flower);
			alert(flower2 instanceof Object);
			alert(flower2 instanceof Flower);
			alert(flower3 instanceof Object);
			alert(flower3 instanceof Flower);
			
			alert(flower1.constructor==Flower);
			alert(flower2.constructor==Flower);
			alert(flower3.constructor==Flower);
		</script>
	</body>
</html>
